﻿@model IEnumerable<WebVideo.EntitySTT_Comment>
@{
    
    foreach (var item in Model)
   {
        <div class="cmt-it">
          
                  @*  <li><a href="#frmEditCmt" role="button" data-toggle="modal">Sửa</a></li>*@
                     @{ 
                         if (item.UserName == Request.Cookies["UserId"].Value)
                        {      
                               <li class="dropdown">
                                 <a href="#" class="dropdown-toggle" data-toggle="dropdown"><b class="caret"></b></a>
                                 <ul class="dropdown-menu">
                                    <li><a href="#" onclick="return DeleteComment(@ViewBag.IdRoot,@item.Id)">Xóa</a></li>
                                 </ul>
                                </li>
                        }
                     }
               
            <div class="img">
                @{
       if (item.EntityUser.Avatar != null)
       {
           <img src="/Content/Images/Avatar/@item.EntityUser.Avatar" />
       }
       else
       {
           <img src="/Content/Images/Avatar/AdminAvatar.jpg" />
       }
                }
                                    
                
            </div>
            <div class="cmt-cnt">
                <a href="#">@item.EntityUser.Name</a> @item.Des
                <div class="info">
                    <span>@item.Date.Value.ToString("hh:mm dd-MM-yyyy")</span>&nbsp;.&nbsp;
                     <a href="#" onclick="return LikeComment(@ViewBag.IdRoot,@item.Id)">Thích</a>&nbsp;.&nbsp;
                     <a href="#" class="n-like" data-toggle="tooltip" data-placement="top">@item.Likes</a>
                </div>
                <!--/ .info-->
            </div>
            <!--/ .cmt-cnt-->
        </div>
        <!--/ .cmt-it-->
}
    <div class="cmt-it">                                        	
        <div class="img">
              @{  
                  if (System.Web.HttpContext.Current.Request.Cookies["UserAvatar"].Value != "")
                                    {
                  string k = "~/Content/Images/Avatar/" + System.Web.HttpContext.Current.Request.Cookies["UserAvatar"].Value; 
                 <img src="@Url.Content(k)" />
              }
              else{
              
                  <img src="/Content/Images/Avatar/AdminAvatar.jpg" />}
                  
                  }
        </div>
        <div class="cmt-cnt">
              <input type="text" placeholder="Bình luận của bạn..!"  id ="@ViewBag.IdRoot" onkeypress="return Comment(event,@ViewBag.IdRoot)"  />
         </div><!--/ .cmt-cnt-->
    </div><!--/ .cmt-it-->
}

